package com.xc.content.controller;

import com.xc.content.model.dto.CourseCategoryDto;
import com.xc.content.service.CourseCategoryService;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@RestController
@Api(tags = "课程信息分类相关接口")
@Slf4j
@AllArgsConstructor
public class CourseCategoryController {
    private final CourseCategoryService courseCategoryService;

    @ApiOperation("课程信息分类查询")
    @GetMapping("/course-category/tree-nodes")
    public List<CourseCategoryDto> treeNodes() {
        log.info("课程信息分类查询");
        return courseCategoryService.queryTreeNodes("1");
    }
}
